<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function f1(){
            // 获取当前页面的url
            // console.log(location.href)

            // 设置url，实现跳转页面
            // location.href = 'http://www.baidu.com'

            // 刷新页面
            // location.reload()

            // history.back()

            history.forward()
        }
    </script>
</head>
<body>
    <button onclick="f1()">按钮1</button>
</body>
</html>